package com.wanpinghui.wphlibrary.model.product.bean;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/***
 * 功能描述:产品规格数据模型
 * 作者:qiujialiu
 * 时间:2017/12/22
 ***/
@Table(name = "product_format")
public class ProductFormatBean {
    /**
     * created_at (integer, optional),
     * deleted_at (integer, optional),
     * id (integer, optional),
     * is_consult (boolean, optional): 是否议价 ,
     * price (number, optional): 价格 ,
     * product_desc_id (integer, optional): 产品说明id ,
     * product_template_id (integer, optional): 产品模板id ,
     * spec_info (string, optional): 组合规格json ,
     * spec_key (string, optional),
     * spec_value (string, optional): 规格值 ,
     * supplier_id (integer, optional),
     * updated_at (integer, optional)
     */
    @Column(name = "id", isId = true, autoGen = false)
    private int id;

//    @Column(name = "name")
//    private String name;

    @Column(name = "price")
    private double price;

    @Column(name = "count")
    private int count;

    @Column(name = "parent_id")
    private int product_template_id;

    @Column(name = "is_consult")
    private boolean is_consult;

    @Column(name = "product_desc_id")
    private int product_desc_id;

    @Column(name = "spec_info")
    private String spec_info;

    @Column(name = "spec_key")
    private String spec_key;

    @Column(name = "name")
    private String spec_value;

    @Column(name = "supplier_id")
    private int supplier_id;

    @Column(name = "updated_at")
    private long updated_at;

    @Column(name = "cart_count")
    private int cart_item_quantity;

    public ProductFormatBean(){}

    public ProductFormatBean(int id, int parentId) {
        this.id = id;
        this.product_template_id = parentId;
    }


    public String getName() {
        return spec_value;
    }

    public void setName(String name) {
        this.spec_value = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getId() {
        return id;
    }

    public int getCart_item_quantity() {
        return cart_item_quantity;
    }

    public boolean isIs_consult() {
        return is_consult;
    }

    public int getProduct_desc_id() {
        return product_desc_id;
    }
}
